<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{Title} (Edit)</title>
<link rel="stylesheet" href="../../css/mem_main.css" type="text/css">
<script Language="JavaScript1.2" type="text/javascript" src="/inc/checkdata_{intLang}.js"></script>
<script Language="JavaScript">
<!--
var intLType = {LType};

function finalcheck(){
	with(document.beMemberFrm){
		if(Check(document.beMemberFrm)){
			if(intLType != 1)document.beMemberFrm["data[EndGameTimeSN_x]"].value = document.beMemberFrm["data[EndGameTime_x]"].value;

			var D = document.beMemberFrm["data[GameDate_x]"].value.split("-");
			var T = document.beMemberFrm["data[GameTime_x]"].value.split(":");
			var ET = document.beMemberFrm["data[EndGameTime_x]"].value.split(":");
			var ETSN = document.beMemberFrm["data[EndGameTimeSN_x]"].value.split(":");
			if(!checkDateFormat(D[0], D[1], D[2])){
				alert("{DateError}");//日期格式不正確
				document.beMemberFrm["data[GameDate_x]"].focus();
			}else if(isNaN(T[0]) || isNaN(T[1]) || isNaN(T[2]) || T[0] < 0 || T[0] > 23 || T[1] < 0 || T[1] > 59 || T[2] < 0 || T[2] > 59 ){
				alert("{TimeError}");//時間格式不正確
				document.beMemberFrm["data[GameTime_x]"].focus();
			}else if(isNaN(ET[0]) || isNaN(ET[1]) || ET[0] < 0 || ET[0] > 23 || ET[1] < 0 || ET[1] > 59){
				alert("{TimeError}");//時間格式不正確
				document.beMemberFrm["data[EndGameTime_x]"].focus();
			}else if(isNaN(ETSN[0]) || isNaN(ETSN[1]) || ETSN[0] < 0 || ETSN[0] > 23 || ETSN[1] < 0 || ETSN[1] > 59){
				alert("{TimeError}");//時間格式不正確
				document.beMemberFrm["data[EndGameTime_x]"].focus();
			}else{
				submit();
			}
		}
	}
}

function ChangeOP(){
	with(document.beMemberFrm){
		op.value = "List";
		submit();
	}
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<!-- 檢驗資料用 //-->
<form name="CheckDataForm">
	<input type="hidden" name="required" value="text;data[LottoID_n];{LottoID}">
	<input type="hidden" name="required" value="text;data[GameDate_x];{GameTime1}">
	<input type="hidden" name="required" value="text;data[GameTime_x];{GameTime2}">
	<input type="hidden" name="required" value="text;data[SerialNo_x];{List_GameNo}">
</form>
<!-- End //-->

<form name="beMemberFrm" method="GET" action="index.php">
<input type="hidden" name="op" value="Update">
<input type="hidden" name="ID" value="{ShowID}">
<input type="hidden" name="LottoID" value="{ShowLottoID}">
<table width="770" border="0" cellspacing="0" cellpadding="0" class="cmti">
  <tr> 
    <td>{Title}: {_Edit}-- 
	  <input type="button" value="{_Add}" class="zabutton" onclick="location.href='index.php?op=Add&GameDate={ShowGameDate}'">
	  {_Date} 
	  <input type="text" name="GameDate" size="10" class="zatexted" value="{ShowGameDate}">
	  <input type="button" value="{_Search}" class="zabutton" onclick="ChangeOP()">
    </td>
  </tr>
</table>

<div class="ctabdv"> 
<table width="700" border="0" cellspacing="1" cellpadding="0" class="ctab">
  <tr class="clef"> 
    <td width="120" class="ctigaed">{ID}</td>
    <td>{ShowID}</td>
  </tr>
  <tr class="clef"> 
    <td width="120" class="ctigaed">{LottoID}</td>
    <td>{ShowLotto}</td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed">{GameDate}</td>
    <td> 
	  {GameTime1}&nbsp;
	  <input type="text" name="data[GameDate_x]" class="zatexted" size="10" maxlength="10" value="{ShowGameDate}">&nbsp;&nbsp;
	  {GameTime2}&nbsp;
	  <input type="text" name="data[GameTime_x]" class="zatexted" size="10" maxlength="8" value="{ShowGameTime}">
	  (ps.Date : yyyy-mm-dd&nbsp;&nbsp;Time : hh:mm:ss)
    </td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed">{EndGameTime}</td>
    <td>
	  <input type="text" name="data[EndGameTime_x]" class="zatexted" size="10" maxlength="8" value="{ShowEndGameTime}">(ps.hh:mm:ss)&nbsp;&nbsp;
	  <!-- @ ShowEndGTime Sd @ //-->{NumberSpecial}<input type="text" name="data[EndGameTimeSN_x]" class="zatexted" size="10" maxlength="8" value="{ShowEndGameTimeSN}"> (ps.hh:mm:ss)<!-- @ ShowEndGTime End @ //-->
	  <!-- @ HiddenEndGTime Sd @ //--><input type="hidden" name="data[EndGameTimeSN_x]" value=""><!-- @ HiddenEndGTime End @ //-->
    </td>
  </tr>
  <tr class="clef"> 
    <td class="ctigaed">{List_GameNo}</td>
    <td><input type="text" name="data[SerialNo_n]" class="zatexted" size="10" value="{ShowSerialNo}"></td>
  </tr>
<!-- @ OGameNo Sd @ //-->
  <tr class="clef"> 
    <td class="ctigaed">{List_OGameNo}</td>
    <td><input type="text" name="data[OSerialNo_n]" class="zatexted" size="10" value="{ShowOSerialNo}"></td>
  </tr>
<!-- @ OGameNo End @ //-->
  <tr class="clef"> 
    <td colspan="2" class="cedfoot"> 
      <input type="button" value="{_Edit}" class="zabutton" onclick="finalcheck()">&nbsp;&nbsp;&nbsp; 
      <input type="reset" value="{_Reset}" class="zabutton">
    </td>
  </tr>
</table>
</div>
</form>
</body>
</html>
